package com.wing.product.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.device.model.entity.Device;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;

/**
 * VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class ProcessDeviceVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 工序id
     */
    private Long processId;
    private Device.Status status;

    /**
     * 设备状态描述
     */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        if (this.status!=null){
            return status.getDesc();
        }
        return null;
    }
    /**
     * 设备id
     */
    private String deviceCode;

    private String deviceName;
    private String workshopName;
    private String categoryName;
    private String deviceTypeName;
    private String deviceModelName;
    private String enclosureUrl;
    private String supplierName;
    private String deviceBrandName;

}
